'''
The Barista User Interface for the coffee bar workflow (Winter Intensives Lab 5)

This is where you define the fields that appear on the screen (application) the barista
sees and tell WMP how this application (user interface) fits into the overall workflow.

Note:  the comments here assume you have already read through the comments
in CoffeeBackend.py and OrderTakerApplication.py and made your edits there.
'''

from frontend.roleApplication import RoleApplication
from frontend.form import Type

class TakeOrderApplication(RoleApplication):

    def __init__(self):
        super(TakeOrderApplication, self).__init__("EricHoldenFoodler", "Foodler"); # use actual work flow name and role name
        # specify actual task name and name_fields:
        self.register_transition_step("TakeOrder", self.prepare_form_creator, name_fields=["sequence", "CustName", "Rest", "Food"]);

    def prepare_form_creator(self, stepname, form):
        form.add_task_label(fields=["CustName", "Rest", "Food"]); # use one or more fields from order to define label

 
if __name__ == '__main__':
    app = TakeOrderApplication()
    app.MainLoop()